﻿using Kingdee.BOS.Core.CommonFilter.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using System.ComponentModel;

namespace Caraya.MFG.BusinessPlugIn
{
    [Description("二开账表过滤窗体条件过滤"), HotUpdate]
    public class PurFilterPlugIn : AbstractCommonFilterPlugIn
    {

        public override void BeforeF7Select(BeforeF7SelectEventArgs e)
        {
            base.BeforeF7Select(e);
            if (e.FieldKey.ToUpper() == "F_CARA_MULBASE" && e.FormId.ToUpper() == "BD_MATERIAL")
            {
                e.ListFilterParameter.Filter = e.ListFilterParameter.Filter.JoinFilterString("FDocumentStatus='C'");
                e.ListFilterParameter.Filter = e.ListFilterParameter.Filter.JoinFilterString("FFORBIDSTATUS='A'");
                e.ListFilterParameter.Filter = e.ListFilterParameter.Filter.JoinFilterString("FERPCLSID=1");
            }
        }
    }
}
